package cn.pzhu.java.ch03.staticdemo;
class B{
	static int objectCount;
	int x;
	static{
		System.out.println("Static Block");
		objectCount=0;
		//x=100;
	}
	B(){
		objectCount++;
	}
	static void objectOfACount(){
		System.out.println(" class B creats "+objectCount+ " objects");
	}
	
}
public class StaticBlockDemo {

	public static void main(String[] args) {
		
		B b1;
		System.out.println("====A===");
		b1=new B();
		System.out.println("====B===");
		B b2=new B();
		B b3=new B();
		B b4=new B();
		B.objectOfACount();

	}

}
